The present invention is directed to a method for programming of an industrial robot having a robot coordinate system and particularly to an application that is programmed by means of a position-measuring unit adapted for measuring positions relative a measuring coordinate system. The invention is useful for applications comprising a tool having a tool coordinate system and a work object to be processed by the tool. The invention is particularly useful in applications that demand high accuracy, such as different types of machining applications, for example fettling, debarring, milling, sawing, grinding and drilling. The application is also useful in applications such as arc welding, water jet cutting, laser cutting, gluing and assembly.
A robot program comprises a number of program instructions controlling the movements of the robot. Generation of a robot program comprises a first step wherein positions and orientations of a path, to be followed by the robot during execution of the program, are defined, and a next step wherein program instructions are generated based on the defined positions and orientations of the path. The positions and orientations defined during the programming comprise the positions and orientations that a tool is expected to obtain in relation to a work object when running the robot program.
A robot application is an application in which an industrial robot is used for performing a work. Robots are often used in applications involving processing of the surface of a work object. Existing practice for programming a robot involves on-line teaching the robot a sequence of positions and orientations. The positions and orientations define a robot path, which the robot shall follow during processing of the object. The robot is taught how to perform a task by being leading the tool through the various positions and orientations along the desired operating path during the programming. The robot program is then generated, based on the specified positions. However programming a robot by teaching can be time-consuming, especially if the work object has a complex geometry.
The accuracy of an application is limited mainly by the repeatability of the robot mechanics and the accuracy with which it is possible to move and rotate the tool to the desired position and orientation. In many high accuracy applications like machining, laser cutting, laser welding etc. the robot repeatability is good enough but it is very difficult for a human eye to find the correct position and orientation of the tool. Moreover, even if a robot programmer with long programming experience manages to obtain the accuracy needed, it will take a lot of time. The problem of long programming time makes it also very expensive to duplicate programs to other robots and to reprogram a robot cell after geometrical changes in the cell or after an exchange of the robot.
The utilization of high-level computer programming language and CAD/CAM has made off-line robot programming more feasible for more complex applications. In order to make off-line programming feasible it is necessary to know the cell geometry and the robot exactly. The work object coordinate system and the tool coordinate system have to be known with high accuracy relative to the robot base coordinate system. Thus, cell, object, tool and robot calibration have been the key issues to use robot off-line programming.
The accuracy of a general-purpose robot is between 5 and 15 mm, which can be improved to between 0.5 and 1 mm by the identification of the kinematic errors of the robot and compensation of these errors by software in the robot controller. However, this robot calibration technique is expensive and very difficult to support in a robot cell, and still the work object and tool coordinate systems must be calibrated. Moreover, this kinematic error compensation method will not be good enough for high accuracy applications.
The object of the present invention is to provide a method for fast and easy robot programming providing a high accuracy in a robot application.
This object is achieved by a method comprising: selecting an object reference structure on or in a fixed relation to the work object, the object reference structure having at least one surface, defining a mathematical model for the object reference structure, defining an object coordinate system in a fixed relation to the object reference structure, providing measurements on said at least one surface of the object reference structure, the measurements being performed by the position-measuring unit and are provided relative to the measuring coordinate system, determining the object coordinate system in relation to the measuring coordinate system, by means of best fit between said measurements performed by the position-measuring unit and said mathematical model of the object reference structure, measuring a plurality of positions on a desired robot path on the object by means of the position-measuring unit, determining the positions of the robot path in the object coordinate system, based on said measured positions of the robot path and said determined object coordinate system, determining the relation between the object coordinate system and the robot coordinate system, determining the relation between the tool coordinate system and the robot coordinate system, and programming the robot path based on said positions of the robot path in the object coordinate system, said relation between the object coordinate system and the robot coordinate system, and said relation between the tool coordinate system and the robot coordinate system. Programming the robot path means generating program instructions for moving the robot so that the tool obtains the positions and orientations in relation to the work object when running the robot program. The robot coordinate system could be any coordinate system defined in relation to the robot. Normally, a robot coordinate system attached to the base of the robot is used as a reference coordinate system for the robot. Thus, said base coordinate system is preferably used as the robot coordinate system.
The method according to the invention is a method for off-line programming of a robot by means of a position-measuring unit, for example a digitizer. The digitizer is used to specify the positions and orientations of the robot path on the work object in relation to an object coordinate system. Off-line programming of a robot is both faster and easier than on-line programming. A problem with off-line programming by a digitizer is that there may be deviations between the tool positions and orientations taught with the digitizer and run with the robot.
To overcome this problem the programming method according to the invention comprises a calibration step utilizing the position-measuring unit for performing measurements on an object reference structure having an object coordinate system defined in a fixed relation to it. If the work object contains well defined surfaces, the reference structure could be selected on the work object, otherwise a reference structure having well defined surfaces is mounted on the work object.
The method according to the invention combines the advantages of off-line programming with the accuracy of lead through programming. Moreover it solves the problems with the limited human accuracy with respect to tool manipulation and makes the programming totally safe since the robot does not need to work during programming and calibration. To make this possible, the position-measuring unit is used both for programming and calibration in such a way that the robot accuracy will not depend on the total kinematic and geometrical errors of the cell, but on just the differential kinematic and geometrical errors. In principle, position differences are used instead of absolute positions for the calibration and programming.
According to an embodiment of the invention said object reference structure is three-dimensional and has at least three non-parallel surfaces, and measurements are provided on said at least three surfaces of the object reference structure. With a three-dimensional reference structure it is possible to calibrate the programmed path poses (positions and orientations that the tool is expected to obtain when running the robot program) to the object coordinate system using the digitizer and then use the programmed path poses expressed in the object coordinate system for programming the robot.
According to an embodiment of the invention said object reference structure is any of a plate, a cube, a cone or a cylinder. Such structures are easy to manufacture and to measure on.
According to an embodiment of the invention said selected object reference structure is positioned in the vicinity of said robot path. Thus, the calibration is improved and a higher accuracy of the programming is achieved.
According to an embodiment of the invention the relation between the object coordinate system and the robot coordinate system comprises performing measurements on at least one surface of the object reference structure, or of a reference structure on or in a fixed relation to the object, wherein the measurements are performed by means of an elongated probe and the inclination of the probe relative to the surface during the measurements is essentially the same as the inclination of the tool in relation to the object in the robot path. If a programmed pose has another tool orientation, than was used during the calibration of the coordinate system, then errors in the robot kinematics may give both position and orientation errors. By having an inclination of the probe during the calibration, which is about the same as the inclination of the tool during the processing of the object, the accuracy of the calibration is improved and thus a higher accuracy of the programming is achieved.
According to an embodiment of the invention the determining of the relation between the object coordinate system and the robot coordinate system comprises: performing measurements on said surface of the object reference structure, the measurements being performed by the robot and are provided relative to the robot coordinate system, and determining the object coordinate system in relation to the robot coordinate system, by means of best fit between said measurements performed by the robot and said mathematical model of the object reference structure. In this embodiment the relation between the object coordinate system and the robot coordinate system is determined by performing measurements with the robot on the same object reference structure, as the measurements with the position-measuring unit. Thus, the calibration can easily be automatically made. No other reference structures or probes, which have to be calibrated, are needed.
Preferably, a robot program, for performing said measurements on the object reference structure by the robot, is automatically generated based on said measurements on the object reference structure performed by the position-measuring unit. Thereby, the calibration can be made easy and quickly.
According to an embodiment of the invention the direction of the normal of said surface of the object reference structure is calculated, based on said measurements on the object reference structure performed by the position-measuring unit, and the robot is moved from said calculated direction towards the surface when performing said measurements. Thus, the robot will know the correct direction to move towards the surface of the object.
According to another embodiment of the invention the determining of the relation between the object coordinate system and the robot coordinate system comprises: selecting a robot reference structure on or in a fixed relation to the robot, the robot reference structure having at least one surface, defining a mathematical model for the robot reference structure, defining a second robot coordinate system in a fixed relation to the robot reference structure, performing measurements on said at least one surface of the robot reference structure, the measurements being made by the robot or the measuring unit, determining the object coordinate system in relation to said first mentioned robot coordinate system, by means of best fit between said measurements of the robot reference structure and said mathematical model of the robot reference structure. Preferably, said measurements performed on said at least one surface of the robot reference structure, are being made by the robot or the positioning measuring unit.
In this embodiment a robot reference structure is defined in addition to the object reference structure. Preferably said robot reference structure is selected on or in a close vicinity of the tool holder of the robot to make it easier to define a reference coordinate system in relation to a tool holder coordinate system. Either the robot reference structure is measured by moving the robot reference structure in contact with a fixed positioned measuring probe, having a known position relative to the robot coordinate system, and reading the robot position at the contact, or by moving the position-measuring unit in contact with the robot reference structure. An advantage with using the positioning-measuring unit is that the accuracy of the measurement will be higher than if the robot makes the measurements. An advantage with using the robot is that the measuring can be automatically made.
According to an embodiment of the invention the method comprises: providing a measuring probe in a fixed known position relative to the robot, performing measurements on the surface of the robot reference structure, the measurements being made by said measuring probe, performing measurements on the surface of the object reference structure, the measurements being made by said measuring probe, determining the relation between the object coordinate system and the second robot coordinate system, based on said measurements of the robot reference structure and said measurements of the object reference structure made by said measuring probe. When a heavy object is on the robot it is difficult to put the work object also on the digitizer. According to this embodiment a fixed mounted probe is used for the measurements. Thus, this method is preferably used when the work object is mounted on the robot and the tool is fixedly mounted in the workcell.
According to an embodiment of the invention said measurements on said surface of the robot reference structure are made by the position-measuring unit and relative to the measuring coordinate system, and said relation between the object coordinate system and the robot coordinate system is determined, based on said object coordinate system relative to the measuring coordinate system. Thus, this method is preferably used when the tool is mounted on the robot, and the work object is fixedly mounted in the workcell. Preferably said robot reference structure is positioned on or in a close vicinity of the outer end of the tool to make the influence of the kinematic errors of the robot as small as possible.
According to an embodiment of the invention the method further comprises: selecting a second object reference structure on or in a fixed relation to the object, the second object reference structure having at least one surface, defining a second object coordinate system on or in a fixed relation to the object reference structure, providing measurements on said at least one surface of the second object reference structure, the measurements being performed by the position-measuring unit and are provided relative to the measuring coordinate system, and determining the second object coordinate system in relation to the measuring coordinate system, by means of best fit between said measurements on the second object reference structure and said mathematical model of the object reference structure, determining the relation between the second object coordinate system and the robot coordinate system, the robot path poses are determined and programmed based on either the first or the second coordinate system according to a chosen condition. It sometimes happens that the robot accuracy is not good enough to catch the whole work object. According to this embodiment more than one object coordinate system is defined to compensate for robot inaccuracy locally on the object. It is also possible to use different object coordinate systems for different tool orientations, to take care of the kinematic errors at different tool orientation.
Which of the different object coordinate systems to be used, when a program defined by the position-measuring unit is run, could be chosen in dependence of which of the first or second coordinate system is closest to the robot path position, which of the first and second coordinate systems has the tool orientation during calibration closest to the tool orientation in the path poses, or which of the first and second coordinate systems has the same torque direction on the robot axes during the calibration as for the path poses.
According to an embodiment of the invention the determining of the relation between the tool coordinate system and the robot coordinate system comprises: defining an reference coordinate system on or in a fixed relation to the tool base, the relation between reference tool coordinate system and the robot coordinate system being known, selecting a first tool reference structure on or in a fixed relation to the reference coordinate system, the first tool reference structure having at least one surface, defining a mathematical model for the first tool reference structure, selecting a second tool reference structure in a fixed relation to the tool coordinate system, and at a distance from the first tool reference structure, the second tool reference structure having at least one surface, defining a mathematical model for the second tool reference structure, providing measurements on said at least one surface of the first tool reference structure, providing measurements on said at least one surface of the second tool reference structure, determining the relation between the tool coordinate system and the reference coordinate system, by means of best fit between said measurements on the first and the second tool reference structures, and said mathematical models of the object reference structures. The tool coordinate system is determined relative to the robot coordinate system by means of two tool reference structures located on or in a fixed relation to each other and at a distance from each other. The reference structures are measured either with the position-measuring unit or the robot and a fixed positioned probe with a known position relative to the robot.
Another object of the invention is to provide a computer program product for fast and easy robot programming of an industrial robot, which provides high accuracy in the robot application. This object is achieved by a computer program product according to the corresponding appending claim, which when run on a computer execute the method according to the invention. The computer program product can be provided via any computer readable medium or via a network, such as the Internet.
It is easy to realize that the method according to the invention, as defined in the appending set of method claims, is suitable for being executed by a computer program having instructions corresponding to the steps in the inventive method when run on a processor unit. Even though not explicitly expressed in the claims, the invention covers a computer program product in combination with the method according to the appended method claims.
Another object of the invention is to provide a computer readable medium having a program recorded thereon for programming an industrial robot, where the program is to make a computer perform the steps of the aforementioned computer program product, when said program is run on the computer.
The computer program product may be run on a controller of the robot or on any other external computer comprising a processor and suitable memory.